ποΈGitΠ―ΡΠ°ποΈ
docs/en/developer/codebase.md 4d4070c8e1ed73a56ee2f054300a0f62e3fe2e62 (4d4070c8) Text, 4.38 KB
title: Codebase
parent: Developer Guide
nav_order: 2
last_updated: 2026-07-08
aliases:
β’ repository-layout
β’ project-structure
β’ source-code
Codebase
Repository layout, namespacing conventions, and build system overview.
Repository Structure
T282828
Meshtastic-Android/
βββ androidApp/ # Android application module
β βββ src/main/ # Shared Android code
β βββ src/google/ # Google Play flavor (Gemini, proprietary)
β βββ src/fdroid/ # F-Droid flavor (FOSS-only)
βββ desktopApp/ # Desktop JVM application
βββ feature/ # Feature modules (KMP)
β βββ intro/
β βββ messaging/
β βββ connections/
β βββ map/
β βββ node/
β βββ settings/
β βββ firmware/
β βββ docs/
β βββ wifi-provision/
β βββ widget/
β βββ discovery/
β βββ car/
βββ core/ # Core infrastructure modules (KMP)
β βββ barcode/
β βββ ble/
β βββ common/
β βββ data/
β βββ database/
β βββ datastore/
β βββ di/
β βββ domain/
β βββ konsist/
β βββ model/
β βββ navigation/
β βββ network/
β βββ nfc/
β βββ prefs/
β βββ repository/
β βββ resources/
β βββ service/
β βββ takserver/
β βββ testing/
β βββ ui/
βββ baselineprofile/ # Baseline Profile generation for :androidApp
βββ screenshot-tests/ # Compose Preview screenshot tests (visual-regression gate)
βββ docs-screenshots/ # Doc-framed composition screenshots (generate-only, not CI-gated)
βββ build-logic/ # Convention plugins and build helpers
β βββ convention/
βββ docs/ # Documentation source (markdown)
β βββ en/ # English source; other locales live under docs/<locale>/user/
β βββ user/
β βββ developer/
βββ gradle/ # Gradle wrapper and version catalog
β βββ libs.versions.toml
βββ specs/ # Feature specifications
βββ .github/workflows/ # CI/CD workflows
Namespacing Convention
All Kotlin packages follow the pattern:
T282828
org.meshtastic.{layer}.{module}.{subpackage}
Examples:
β’ T383838org.meshtastic.core.navigation β core navigation module
β’ T383838org.meshtastic.feature.docs.ui β docs feature UI package
β’ T383838org.meshtastic.app.di β app DI configuration
Build System
Gradle Kotlin DSL
All build files use Kotlin DSL (T383838.gradle.kts). Configuration:
β’ Version catalog: T383838gradle/libs.versions.toml
β’ Convention plugins: T383838build-logic/convention/
β’ Settings: T383838settings.gradle.kts
Convention Plugins
Located in T383838build-logic/convention/src/main/kotlin/:
ββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β Plugin β Purpose β
ββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ€
β T383838meshtastic.kmp.feature β Standard feature module setup β
β T383838meshtastic.kmp.jvm.android β JVM + Android target configuration β
β T383838meshtastic.kotlinx.serialization β Serialization plugin setup β
ββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββ
Build Variants (Android)
ββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Flavor β Description β
ββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β T383838google β Google Play distribution; includes proprietary APIs β
β T383838fdroid β F-Droid distribution; FOSS-only dependencies β
ββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Key Gradle Tasks
T282828
T8b949e# Compile check across all KMP targets
./gradlew kmpSmokeCompile
T8b949e# Run all tests
./gradlew allTests
T8b949e# Code quality
./gradlew spotlessCheck detekt
T8b949e# Android build
./gradlew assembleGoogleDebug assembleFdroidDebug
T8b949e# Desktop run
./gradlew :desktopApp:run
T8b949e# Desktop native installers for the current OS (DMG / MSI+EXE / DEB+RPM+AppImage)
./gradlew :desktopApp:packageReleaseDistributionForCurrentOS
T8b949e# API reference (Dokka HTML β build/dokka/html)
./gradlew dokkaGeneratePublicationHtml
Version Catalog Highlights
Key dependencies in T383838gradle/libs.versions.toml:
βββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β Category β Library β
βββββββββββββββββΌββββββββββββββββββββββββββββββββββββ€
β Compose β Compose Multiplatform (JetBrains) β
β Navigation β Navigation 3 β
β DI β Koin (annotations) β
β Serialization β kotlinx.serialization β
β Database β Room KMP β
β Networking β Ktor β
β Markdown β multiplatform-markdown-renderer β
β Testing β kotlin-test, compose-ui-test β
βββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββ
Served by rngit 1.5.0 - Generated in 0.05s